package me.fenglu.autodeploy;

import java.io.File;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public class Config extends PropertiesConfiguration {
	private static Configuration config;
	static {
		try {
			config = new Config(new File(Config.class.getClassLoader().getResource("main.properties").getFile()));
		} catch (ConfigurationException e) {
			e.printStackTrace();
		}
	}
	private Config(){}
	private Config(File file) throws ConfigurationException {
		super(file);
	}
	
	public static Configuration newInstance() {
		return config;
	}
}
